package com.winchain.provider.expiration.vo;

import java.util.ArrayList;
import java.util.List;

public class BatchStats<T>
{
  private int affectedRows;
  private List<T> abnormalRecords;
  private List<String> abnormalMsgs;
  private String txSnHost;
  
  public int getAffectedRows()
  {
    return this.affectedRows;
  }
  
  public void setAffectedRows(int affectedRows)
  {
    this.affectedRows = affectedRows;
  }
  
  public int addAffectedRows()
  {
    return ++this.affectedRows;
  }
  
  public void addPassedRecord(T record)
  {
    addAffectedRows();
  }
  
  public void addAbnormalRecord(T record)
  {
    if (this.abnormalRecords == null) {
      this.abnormalRecords = new ArrayList();
    }
    this.abnormalRecords.add(record);
  }
  
  public void addAbnormalMsg(String msg)
  {
    if (this.abnormalMsgs == null) {
      this.abnormalMsgs = new ArrayList();
    }
    this.abnormalMsgs.add(msg);
  }
  
  public List<T> getAbnormalRecord()
  {
    return this.abnormalRecords;
  }
  
  public void setAbnormalRecord(List<T> abnormalRecords)
  {
    this.abnormalRecords = abnormalRecords;
  }
  
  public List<String> getAbnormalMsg()
  {
    return this.abnormalMsgs;
  }
  
  public void setAbnormalMsg(List<String> abnormalMsgs)
  {
    this.abnormalMsgs = abnormalMsgs;
  }
  
  public String getTxSnHost()
  {
    return this.txSnHost;
  }
  
  public void setTxSnHost(String txSnHost)
  {
    this.txSnHost = txSnHost;
  }
}
